package model

import (
	"time"
)

var (
	MONITOR_TYPE_ENUM = map[string]bool{
		"type000": true, //自定义策略
		"type001": true, //当前值大于某阈值
		"type002": true, //涨幅大于某阈值
		"type003": true, //过去几分钟内涨幅大于某阈值
		"type004": true, //过去几分钟内跌幅大于某阈值
	}
)

type Strategy struct {
	Code             string             `json:"code"`
	StockExpressions []*StockExpression `json:"stockExpressions"`
	ContactType      string             `json:"contactType"`
	ContactValue     string             `json:"contactValue"`
	StrategyId       string             `json:"strategyId"`
	ExpiredTime      time.Time          `json:"expiredTime"`
}
type StockExpression struct {
	MonitorType   string   `json:"monitorType"`
	MonitorArgs   []string `json:"monitorArgs"`
	CompareString string   `json:"compareString"`
	Stockql       string   `json:"stockql"`
	Message       string   `json:"message"`
}
